Cover TOC Chap Prev Chap Prev Fig Next Fig Next Chap

Chapter 21: Creating Shiny Shapes Using Materials

../ch21/21fig04a.gif
Figure 21.4a

A dull gray vase. Compare with Figures 21.4b, c, and d.

21fig04a.wrl
Click on the image to view the VRML scene.

#VRML V2.0 utf8
# The VRML 2.0 Sourcebook
# Copyright (c) 1997
# Andrea L. Ames, David R. Nadeau, and John L. Moreland
Group {
    children [
        PointLight {
            location 3.0 3.0 3.0
            ambientIntensity 0.2
        },
        Shape {
            appearance Appearance {
                material Material {
                    diffuseColor 0.40 0.40 0.40
                }
            }
            geometry Extrusion {
                creaseAngle 1.57
                endCap FALSE
                solid  FALSE
                crossSection [
                # Circle
                     1.00  0.00,   0.92 -0.38,
                     0.71 -0.71,   0.38 -0.92,
                     0.00 -1.00,  -0.38 -0.92,
                    -0.71 -0.71,  -0.92 -0.38,
                    -1.00 -0.00,  -0.92  0.38,
                    -0.71  0.71,  -0.38  0.92,
                     0.00  1.00,   0.38  0.92,
                     0.71  0.71,   0.92  0.38,
                     1.00  0.00
                ]
                spine [
                # Straight-line
                    0.0 0.0 0.0,  0.0 0.4 0.0,
                    0.0 0.8 0.0,  0.0 1.2 0.0,
                    0.0 1.6 0.0,  0.0 2.0 0.0,
                    0.0 2.4 0.0,  0.0 2.8 0.0,
                    0.0 3.2 0.0,  0.0 3.6 0.0,
                    0.0 4.0 0.0
                ]
                scale [
                    1.8  1.8,  1.95 1.95,
                    2.0  2.0,  1.95 1.95
                    1.8  1.8,  1.5  1.5
                    1.2  1.2,  1.05 1.05,
                    1.0  1.0,  1.05  1.05,
                    1.15 1.15,
                ]
            }
        }
    ]
}